<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*,java.io.*,java.sql.*,InvestmentPojo.*,ImmovableIndia.*;"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Your Transfor Page</title>
<link rel="icon" type="image664/png" href="images664/dev7logo.png" />
</head>
<%!
ConnectionPool pool=null;
public Connection getConnection() throws SQLException, Exception {
	pool=new ConnectionPool();
	return pool.getConnection();
}
%>
<% 
Properties props = new Properties(System.getProperties());

List optionsList123=new ArrayList();
Connection con=null;
ResultSet rs=null;
Statement st=null;
String optionvalue="";
try{
	con=getConnection();
	st=con.createStatement();
	rs=st.executeQuery("select * from investment_in_india where form_id = 2 order by option_label");
	while(rs.next()){
		OptionsList obj = new OptionsList();
		obj.setOptionId(rs.getString(1));
		obj.setListTypeId(rs.getString(2));
		obj.setOptionLabel(rs.getString(3));
		obj.setOptionValue(rs.getString(4));
		optionsList123.add(obj);
	}
}catch(Exception e ){
	e.printStackTrace();
	
}finally{
	try {
		if(null != rs)
			pool.releaseResources(rs);
		System.out.println("Connection RS closed........--------------");
		if(null != st)
			pool.releaseResources(st);
		System.out.println("Connection ST closed........--------------");
		if(null != con)
		pool.releaseConnection(con);
		System.out.println("Connection con closed........--------------");
	} catch (Exception e) {
		e.printStackTrace();
	}
}
%>
<script type="text/javascript">
function onQuestClick(id){
	
	var id1= document.getElementById(id);
	
		switch (id1.value)
	{    
	case '1':
		 document.getElementById("trtag2").style.display="none";
		 document.getElementById("trtag1").style.display="";
		 document.getElementById("TABLE1").style.display="";
		// document.getElementById("trtag93").style.display="";
		 document.getElementById("TRDISP").style.display="";
		 break;
	case '2':
         document.getElementById("trtag2").style.display="";
		 document.getElementById("trtag1").style.display="none";
		 document.getElementById("TABLE1").style.display="";
		 //document.getElementById("trtag93").style.display="none";
		 document.getElementById("TRDISP").style.display="";
		 break;
	default:
	 	document.getElementById("trtag1").style.display="";
	 	document.getElementById("trtag2").style.display="";
	 	document.getElementById("TABLE1").style.display="none";
	 	document.getElementById("TABLE2").style.display="none";
	 	document.getElementById("TABLE3").style.display="none";
	 	document.getElementById("TABLE4").style.display="none";
	 	document.getElementById("TABLE5").style.display="none";
	 	document.getElementById("TABLE6").style.display="none";
	 	document.getElementById("TABLE7").style.display="none";
	 	document.getElementById("TABLE8").style.display="none";
	 	document.getElementById("Result").style.display="none";
	 	document.getElementById("submit").style.display="none";
	 	
	 	document.getElementById("TRDISP").style.display="none";
	 	radioUncheckFun("qest"); radioUncheckFun("qest1"); radioUncheckFun("qest2");
	 	radioUncheckFun("repart"); radioUncheckFun("repart1");
	 	 radioUncheckFun("notMSME");  radioUncheckFun("MSME");
		  document.getElementById("TABLE6").style.display="none";
		  document.getElementById("TABLE7").style.display="none";
	 	onQuestClick1("TRDISP1");
	}	
		
}


function onQuestClick1(id){
	var id1= document.getElementById(id);
		switch (id1.value)
	{    
	case '3':
		 document.getElementById("transforee4").style.display="none";
		 document.getElementById("transforee5").style.display="none";
		 document.getElementById("transforee3").style.display="";
		 document.getElementById("TABLE2").style.display="";
		 document.getElementById("TRDISP1").style.display="";
		 break;
	case '4':
         document.getElementById("transforee3").style.display="none";
		 document.getElementById("transforee5").style.display="none";
		 document.getElementById("transforee4").style.display="";
		 document.getElementById("TABLE2").style.display="";
		 document.getElementById("TRDISP1").style.display="";
		 break;
	case '5':
         document.getElementById("transforee4").style.display="none";
		 document.getElementById("transforee5").style.display="";
		 document.getElementById("transforee3").style.display="none";
		 document.getElementById("TABLE2").style.display="";
		 document.getElementById("TRDISP1").style.display="";
		 break;
	default:
		document.getElementById("transforee3").style.display="";
	 	document.getElementById("transforee4").style.display="";
	 	document.getElementById("transforee5").style.display="";
	 	document.getElementById("TABLE2").style.display="none";
	 	document.getElementById("TABLE3").style.display="none";
	 	document.getElementById("TABLE4").style.display="none";
	 	document.getElementById("TABLE5").style.display="none";
	 	document.getElementById("TABLE6").style.display="none";
	 	document.getElementById("TABLE7").style.display="none";
	 	document.getElementById("TABLE8").style.display="none";
	 	document.getElementById("Result").style.display="none";
	 	document.getElementById("submit").style.display="none";
	 	document.getElementById("TRDISP1").style.display="none";
	 	radioUncheckFun("qest1"); radioUncheckFun("qest2"); 
	 	radioUncheckFun("repart"); radioUncheckFun("repart1");
	 	 radioUncheckFun("notMSME");  radioUncheckFun("MSME");
		  document.getElementById("TABLE6").style.display="none";
		  document.getElementById("TABLE7").style.display="none";
	 	onQuestClick2("TRDISP2");
	}	
		
}

function onQuestClick2(id){
	var id1= document.getElementById(id);
	var tranferorvalue = getSelectedRadiosValue("qest");
		switch (id1.value)
	{    
	case '6':
		 document.getElementById("transforor6").style.display="";
		 document.getElementById("transforor7").style.display="none";
		 document.getElementById("TRDISP2").style.display="";
		 if("1" == tranferorvalue){
		 document.getElementById("TABLE3").style.display="";	 
		 }else
		 document.getElementById("TABLE8").style.display="";
		 break;
	case '7':
         document.getElementById("transforor6").style.display="none";
		 document.getElementById("transforor7").style.display="";
		 document.getElementById("TRDISP2").style.display="";
		 if("1" == tranferorvalue){
		 document.getElementById("TABLE3").style.display="";	 
		 }else
		 document.getElementById("TABLE8").style.display="";
		 break;
		
	default:
		document.getElementById("transforor6").style.display="";
	 	document.getElementById("transforor7").style.display="";
	 	document.getElementById("TRDISP2").style.display="none";
	 	document.getElementById("TABLE3").style.display="none";
	 	document.getElementById("TABLE4").style.display="none";
	 	document.getElementById("TABLE5").style.display="none";
	 	document.getElementById("TABLE6").style.display="none";
	 	document.getElementById("TABLE7").style.display="none";
	 	document.getElementById("TABLE8").style.display="none";
	 	document.getElementById("Result").style.display="none";
	 	document.getElementById("submit").style.display="none";
	 	 radioUncheckFun("notMSME");  radioUncheckFun("MSME");
		  document.getElementById("TABLE6").style.display="none";
		  document.getElementById("TABLE7").style.display="none";
	 	radioUncheckFun("qest2"); 
	 	radioUncheckFun("repart"); radioUncheckFun("repart1");
	}	
		
		
}
function onClickRepatriations(){
	//document.getElementById("selected").style.display="none";
	document.getElementById("sectorsid").selectedIndex='';
	var repart=document.getElementById("repart");
	var norepart=document.getElementById("norepart");
	 //var sectorId=document.getElementById("sectorsid");
	 //onInvModeChange('TRDISP2'); radioUncheckFun("modeofinvest"); 
	  radioUncheckFun("notMSME");  radioUncheckFun("MSME");
	  document.getElementById("TABLE6").style.display="none";
	  document.getElementById("TABLE7").style.display="none";
	  document.getElementById("Result").style.display="none";
	 	document.getElementById("submit").style.display="none";
	 //alert(sectorId.value);
	 if(repart.checked){
		 	document.getElementById("TABLE4").style.display="";
		 	document.getElementById("TABLE5").style.display="none";
		 	document.getElementById("TABLE6").style.display="none";
		 	document.getElementById("TABLE7").style.display="none";
	     }
	 if(norepart.checked){
		    document.getElementById("TABLE4").style.display="";
		 	document.getElementById("TABLE5").style.display="none";
		 	document.getElementById("TABLE6").style.display="none";
		 	document.getElementById("TABLE7").style.display="none";
}}
function  onStatusRepatriations(){
	 radioUncheckFun("notMSME");  radioUncheckFun("MSME");
	  document.getElementById("TABLE6").style.display="none";
	  document.getElementById("TABLE7").style.display="none";
	document.getElementById("sectorsid").selectedIndex='';
	var repart=document.getElementById("repart1");	
	var norepart=document.getElementById("norepart1");
	document.getElementById("Result").style.display="none";
 	document.getElementById("submit").style.display="none";
	 //var sectorId=document.getElementById("sectorsid");
	 //onInvModeChange('TRDISP2'); radioUncheckFun("modeofinvest"); 
	 radioUncheckFun("MSME"); radioUncheckFun("notMSME");
	 //alert(sectorId.value);
	 if(repart.checked){
		 	document.getElementById("TABLE4").style.display="";
		 	document.getElementById("TABLE5").style.display="none";
		 	document.getElementById("TABLE6").style.display="none";
		 	document.getElementById("TABLE7").style.display="none";
	     }
	 if(norepart.checked){
		    document.getElementById("TABLE4").style.display="";
		 	document.getElementById("TABLE5").style.display="none";
		 	document.getElementById("TABLE6").style.display="none";
		 	document.getElementById("TABLE7").style.display="none";
}	
}

function onSectorsChange(){
	//document.getElementById("selected").style.display="none";
	var x=document.getElementById("sectorsid").selectedIndex;
	var sectoroptionvalue=document.getElementById("sectorsid").options;
	var subsectorsid = document.getElementById("subsectorsid");
	
	 //document.getElementById("TABLE5").style.display="";
	 document.getElementById("TABLE6").style.display="none";
	 document.getElementById("TABLE7").style.display="none";
	 document.getElementById("Result").style.display="none";
	//subsectorsid.innerHTML = xmlhttp.responseText;
	if(sectoroptionvalue != null && "" != sectoroptionvalue){
		switch(sectoroptionvalue[x].value){
		case '17':
			subsectorsid.innerHTML='';
			document.getElementById("TABLE5").style.display="";
			 document.getElementById("TABLE6").style.display="none";
			 document.getElementById("TABLE7").style.display="none";
			document.getElementById("Result").style.display="none";
			document.getElementById("submit").style.display="none";
			subsectorsid.innerHTML +="<option value=''>Select One</option>";
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("13")){
				%>
				subsectorsid.innerHTML +="<option name='<%=obj.getOptionId()%>' id='<%=obj.getOptionId()%>~<%=obj.getQestFlag()%>' value='<%=obj.getOptionValue()%>' title='<%=obj.getOptionValue()%>'><%=obj.getOptionLabel()%></option>";
				<%	
				}
				}	  		
			} %>
			    break;
		case '18':
			//alert(sectoroptionvalue[x].text+"-------function inside start......");
			subsectorsid.innerHTML='';
			document.getElementById("TABLE5").style.display="";
			 document.getElementById("TABLE6").style.display="none";
			 document.getElementById("TABLE7").style.display="none";
			document.getElementById("Result").style.display="none";
			document.getElementById("submit").style.display="none";
			subsectorsid.innerHTML="<option value=''>Select One</option>"
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("14")){
				%>
				subsectorsid.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>~<%=obj.getQestFlag()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionValue()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '19':
			//alert(sectoroptionvalue[x].text+"-------function inside start......");
			subsectorsid.innerHTML='';
			document.getElementById("TABLE5").style.display="";
			 document.getElementById("TABLE6").style.display="none";
			 document.getElementById("TABLE7").style.display="none";
			document.getElementById("Result").style.display="none";
			document.getElementById("submit").style.display="none";
			subsectorsid.innerHTML="<option value=''>Select One</option>"
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("15")){
				%>
				subsectorsid.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>~<%=obj.getQestFlag()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionValue()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '25':
			//alert(sectoroptionvalue[x].text+"-------function inside start......");
			subsectorsid.innerHTML='';
			document.getElementById("TABLE5").style.display="";
			 document.getElementById("TABLE6").style.display="none";
			 document.getElementById("TABLE7").style.display="none";
			document.getElementById("Result").style.display="none";
			document.getElementById("submit").style.display="none";
			subsectorsid.innerHTML="<option value=''>Select One</option>"
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("16")){
				%>
				subsectorsid.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>~<%=obj.getQestFlag()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionValue()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '28':
			//alert(sectoroptionvalue[x].text+"-------function inside start......");
			subsectorsid.innerHTML='';
			document.getElementById("TABLE5").style.display="";
			 document.getElementById("TABLE6").style.display="none";
			 document.getElementById("TABLE7").style.display="none";
			document.getElementById("Result").style.display="none";
			document.getElementById("submit").style.display="none";
			subsectorsid.innerHTML="<option value=''>Select One</option>"
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("17")){
				%>
				subsectorsid.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>~<%=obj.getQestFlag()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionValue()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '30':
			//alert(sectoroptionvalue[x].text+"-------function inside start......");
			subsectorsid.innerHTML='';
			document.getElementById("TABLE5").style.display="";
			 document.getElementById("TABLE6").style.display="none";
			 document.getElementById("TABLE7").style.display="none";
			document.getElementById("Result").style.display="none";
			document.getElementById("submit").style.display="none";
			subsectorsid.innerHTML="<option value=''>Select One</option>"
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("18")){
				%>
				subsectorsid.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>~<%=obj.getQestFlag()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionValue()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '31':
			//alert(sectoroptionvalue[x].text+"-------function inside start......");
			subsectorsid.innerHTML='';
			document.getElementById("TABLE5").style.display="";
			 document.getElementById("TABLE6").style.display="none";
			 document.getElementById("TABLE7").style.display="none";
			document.getElementById("Result").style.display="none";
			document.getElementById("submit").style.display="none";
			subsectorsid.innerHTML="<option value=''>Select One</option>"
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("19")){
				%>
				subsectorsid.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>~<%=obj.getQestFlag()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionValue()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '34':
			//alert(sectoroptionvalue[x].text+"-------function inside start......");
			subsectorsid.innerHTML='';
			document.getElementById("TABLE5").style.display="";
			 document.getElementById("TABLE6").style.display="none";
			 document.getElementById("TABLE7").style.display="none";
			document.getElementById("Result").style.display="none";
			document.getElementById("submit").style.display="none";
			subsectorsid.innerHTML="<option value=''>Select One</option>"
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("26")){
				%>
				subsectorsid.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>~<%=obj.getQestFlag()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionValue()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '38':
			//alert(sectoroptionvalue[x].text+"-------function inside start......");
			subsectorsid.innerHTML='';
			document.getElementById("TABLE5").style.display="";
			 document.getElementById("TABLE6").style.display="none";
			 document.getElementById("TABLE7").style.display="none";
			document.getElementById("Result").style.display="none";
			document.getElementById("submit").style.display="none";
			subsectorsid.innerHTML="<option value=''>Select One</option>"
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("20")){
				%>
				subsectorsid.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>~<%=obj.getQestFlag()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionValue()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '45':
			//alert(sectoroptionvalue[x].text+"-------function inside start......");
			subsectorsid.innerHTML='';
			document.getElementById("TABLE5").style.display="";
			 document.getElementById("TABLE6").style.display="none";
			 document.getElementById("TABLE7").style.display="none";
			document.getElementById("Result").style.display="none";
			document.getElementById("submit").style.display="none";
			subsectorsid.innerHTML="<option value=''>Select One</option>"
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("22")){
				%>
				subsectorsid.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>~<%=obj.getQestFlag()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionValue()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '47':
			//alert(sectoroptionvalue[x].text+"-------function inside start......");
			subsectorsid.innerHTML='';
			document.getElementById("TABLE5").style.display="";
			 document.getElementById("TABLE6").style.display="none";
			 document.getElementById("TABLE7").style.display="none";
			document.getElementById("Result").style.display="none";
			document.getElementById("submit").style.display="none";
			subsectorsid.innerHTML="<option value=''>Select One</option>"
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("21")){
				%>
				subsectorsid.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>~<%=obj.getQestFlag()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionValue()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		default :
		        var radios=0;
		        var selectedValue=0;
		        //selectedValue = getSelectedRadiosValue("entity");		
				document.getElementById("subsectorsid").selectedIndex='';
				document.getElementById("TABLE5").style.display="none";
				document.getElementById("submit").style.display="none";
				document.getElementById("Result").style.display="none";
				if("1" == getSelectedRadiosValue("qest")){//NRI FDI plicy
						var nriAutomaticArr = new Array("15","20","24","36","43","44");
						var nriProhibitedArr = new Array("14","16","21","23","26","27","29","33","34","37","46");
						var nriGovernmentArr = new Array("22","97","32","35","40","39","41","42");
						var autoAndGov="52";
						var automaticsector = document.getElementById("sectorsid");
						document.getElementById("TABLE6").style.display="none";
						document.getElementById("TABLE7").style.display="none";
						if(automaticsector != null && automaticsector != ""){
						for (var i = 0; i < nriAutomaticArr.length; i++){
							if(nriAutomaticArr[i] == automaticsector.value){
							 document.getElementById("TABLE6").style.display="";								
							}
							  } 
						for (var i = 0; i < nriProhibitedArr.length; i++){
							if(nriProhibitedArr[i] == automaticsector.value){
								document.getElementById("submit").style.display="";								
							}
							  } 
						for (var i = 0; i < nriGovernmentArr.length; i++){
							if(nriGovernmentArr[i] == automaticsector.value){
								document.getElementById("TABLE6").style.display=""
								//document.getElementById("submit").style.display="";								
							}
							  } 
						}if (autoAndGov == automaticsector.value){
							document.getElementById("TABLE6").style.display="";
						}
						
					}
				else if("2" == getSelectedRadiosValue("qest")){//3rd option FDI plicy
							var othAutomaticArr = new Array("15","20","24","36","43","44");
							var othProhibitedArr = new Array("14","16","21","23","26","27","29","33","34","37");
							var othGovernmentArr = new Array("22","97","32","35","40","39","41","42","46");
							var autoAndGovArr = new Array("52","49","53","57","36","73");
							var automaticsector = document.getElementById("sectorsid");
							document.getElementById("TABLE6").style.display="none";
							document.getElementById("TABLE7").style.display="none";
							if(automaticsector != null && automaticsector != ""){
							for (var i = 0; i < othAutomaticArr.length; i++){
								if(othAutomaticArr[i] == automaticsector.value){
								 document.getElementById("TABLE6").style.display="";								
								}
								  } 
							for (var i = 0; i < othProhibitedArr.length; i++){
								if(othProhibitedArr[i] == automaticsector.value){
									document.getElementById("submit").style.display="";								
								}
								  } 
							for (var i = 0; i < othGovernmentArr.length; i++){
								if(othGovernmentArr[i] == automaticsector.value){
									document.getElementById("submit").style.display="";								
								}
								  } 
							for (var i = 0; i < autoAndGovArr.length; i++){
								if(autoAndGovArr[i] == automaticsector.value){
									document.getElementById("TABLE6").style.display="";								
								}
								  }
							}
						}
				else{
					document.getElementById("TABLE6").style.display="";
			     }
			     //onInvModeChange('TRDISP2');
		}
		
}}
 function onSubSectorsChange(){
	 //document.getElementById("selected").style.display="none";
	  radioUncheckFun("notMSME");  radioUncheckFun("MSME");
	  document.getElementById("TABLE6").style.display="none";
	  document.getElementById("TABLE7").style.display="none";
	 document.getElementById("submit").style.display="none";
	 document.getElementById("Result").style.display="none";
	 if("1" == getSelectedRadiosValue("qest")){//NRI FDI plicy
				var nriAutomaticArr = new Array("48","49","50","51","53","54","57","60","61","63","69","70","80","73","76");
				var nriGovernmentArr = new Array("55","56","58","59","62","64","65","66","67","68","71","72","74","75","77","108","109");
				var automaticsector = document.getElementById("subsectorsid");
				var autoAndGov="52";
				document.getElementById("TABLE6").style.display="none";
				document.getElementById("table4").style.display="none";
				if(automaticsector != null && automaticsector != ""){
				for (var i = 0; i < nriAutomaticArr.length; i++){
					if(nriAutomaticArr[i] == automaticsector.value){
					 document.getElementById("submit").style.display="none";
					 document.getElementById("TABLE6").style.display="";								
					}
					  } 
				for (var i = 0; i < nriGovernmentArr.length; i++){
					if(nriGovernmentArr[i] == automaticsector.value){
						document.getElementById("TABLE6").style.display=""
						//document.getElementById("submit").style.display="";								
					}
					  } 
				}if (autoAndGov == automaticsector.value){
					document.getElementById("TABLE6").style.display="";
				}
				
	}else if("2" == getSelectedRadiosValue("qest")){//3rd option FDI plicy
				var othAutomaticArr = new Array("48","50","51","54","60","61","63","69","80","76","70");
				var othGovernmentArr = new Array("55","56","58","59","62","64","65","66","67","68","71","72","74","75","77","108","109");
				var automaticsector = document.getElementById("subsectorsid");
				var autoAndGov = new Array("52","49","53","57","36","73");
				document.getElementById("TABLE6").style.display="none";
				document.getElementById("TABLE7").style.display="none";
				if(automaticsector != null && automaticsector != ""){
				for (var i = 0; i < othAutomaticArr.length; i++){
					if(othAutomaticArr[i] == automaticsector.value){
					 document.getElementById("submit").style.display="none";
					 document.getElementById("TABLE6").style.display="";								
					}
					  } 
				for (var i = 0; i < othGovernmentArr.length; i++){
					if(othGovernmentArr[i] == automaticsector.value){
						document.getElementById("submit").style.display="";								
					}
					  } 
				for (var i = 0; i < autoAndGov.length; i++){
					if(autoAndGov[i] == automaticsector.value){
						document.getElementById("TABLE6").style.display="";								
				}
				  }
			    }
				}
	}

 function onClickMSMEDS(){
	 radioUncheckFun("notMSME");
	 //document.getElementById("selected").style.display="none";
	 var yesbutton = document.getElementById("MsMeD");
	 var nobutton = document.getElementById("NoMsMeD");
	 if(yesbutton.checked){
		 //document.getElementById("table6").style.display="";
		 document.getElementById("submit").style.display="";
		 document.getElementById("Result").style.display="none";
		 document.getElementById("TABLE7").style.display="none";
		}
	
	 if(nobutton.checked){
		 document.getElementById("submit").style.display="none";
		 //document.getElementById("TABLE6").style.display="none";
		 document.getElementById("TABLE7").style.display="";
		 document.getElementById("Result").style.display="none";
	 }
	 
}
function onClickNotMSMEDS(){
	//document.getElementById("selected").style.display="none";
	 var yesbutton=document.getElementById("YeSmSmEd");
	 var nobutton=document.getElementById("NOMsMeD");
	 if(yesbutton.checked){
		 document.getElementById("Result").style.display="none";
		 document.getElementById("submit").style.display="";
		}
	 if(nobutton.checked){
		 document.getElementById("Result").style.display="none";
		 document.getElementById("submit").style.display="";
	 }
}
 function loadFormsToSubmit()
 {

 	var selectedValue ='';
 	var sectorId = '';
 	var subsectorId = '';
 	var invRadiosValue = getSelectedRadiosValue("qest");
 	    if(invRadiosValue != "" && null != invRadiosValue){ 
 	    	selectedValue = invRadiosValue;  
 	}	//alert(selectedValue+"--1");
 	var entityRadios = getSelectedRadiosValue("qest1");		
 	    if(entityRadios != "" && null != entityRadios){ 
 	    	selectedValue = selectedValue+'.'+entityRadios;  
 	} 	///alert(selectedValue+"--2");
 	var entityRadios = getSelectedRadiosValue("qest2");		
 	    if(entityRadios != "" && null != entityRadios){ 
 	    	selectedValue = selectedValue+'.'+entityRadios;  
 	} 
 	    var entityRadios = getSelectedRadiosValue("repart");		
 	    if(entityRadios != "" && null != entityRadios){ 
 	    	selectedValue = selectedValue+'.'+entityRadios;  
 	} 
 	    var entityRadios = getSelectedRadiosValue("repart1");		
 	    if(entityRadios != "" && null != entityRadios){ 
 	    	selectedValue = selectedValue+'.'+entityRadios;  
 	} 
 	sectorId = document.getElementById("sectorsid");
 		if(sectorId.value != "")		
 		selectedValue = selectedValue+'.'+sectorId.value; 
 	//alert(selectedValue+"--3");
     subsectorId= document.getElementById("subsectorsid");
     	if(subsectorId.value != ""){
     	selectedValue = selectedValue+'.'+subsectorId.value;
     }//alert(selectedValue+"--4");
 	var msmedValue = getSelectedRadiosValue("MSME");
 		if(msmedValue != "" && null != msmedValue){
 			selectedValue = selectedValue+'.'+msmedValue;
 		}
 	var notMsmedValue = getSelectedRadiosValue("notMSME");
 		if(notMsmedValue != "" && null != notMsmedValue){
 			selectedValue = selectedValue+'.'+notMsmedValue;
 		}
 	//alert("selected value = "+selectedValue);
 	//document.getElementById("selected").innerHTML = "Selected Key - "+selectedValue;
 	var xmlhttp;
 	if (window.XMLHttpRequest)
 	  {
 		// code for IE7+, Firefox, Chrome, Opera, Safari
 	   xmlhttp=new XMLHttpRequest();
 	  }
 	else
 	  {
 		// code for IE6, IE5
 	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
 	  }
 	xmlhttp.onreadystatechange=function()
 	  {
 	  if (xmlhttp.readyState==4 && xmlhttp.status==200)
 	     {
 		document.getElementById("respDiv").innerHTML='';
 		cache: false;
 	    document.getElementById("respDiv").innerHTML=xmlhttp.responseText;
 	    cache: false;
 	    }
 	  }
 	xmlhttp.open("GET","investorAction.do?key="+selectedValue+"&formId="+2,true);
 	xmlhttp.send();
 	selectedValue = '';
 }
 function goForConclude(){
		loadFormsToSubmit();
		document.getElementById("Result").style.display="";
		//document.getElementById("selected").style.display="";
		document.getElementById("respDiv").innerHTML="<img alt='Plz wait...' src='loading9.gif' width='30'/>&nbsp;&nbsp;<p valign='top'>Plz wait...while loading...</p>";
		document.getElementById('bottom').scrollIntoView();
	}
function setVisibilityArr(varArray,visibility){
    if(null != varArray){
        for(i = 0; i < varArray.length; i++){
            var tdvar = varArray[i];
            if(tdvar != null){
            tdvar.style.display=visibility;
            }
        }
    }
 }

</script>
<body bgcolor="">
	<form name="frm" method="post">
		<table width="830" align="center" border="0" cellspacing="0"
			cellpadding="0" valign="middle">
			<input type="hidden" name="formId" value="2" />
			<!-- <tr>
				<td><a href="javascript:home()">Home</a></td>
			</tr> -->
		</table>
		<table width="830" align="center" class="TBFORM" border="0"
			cellspacing="0" cellpadding="0" valign="middle">

			<tr>
				<td align="center" height="10" class="TITLEFORM">Transfor Tool</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
			</tr>
			<tr>
		<td width="830" style="padding-left:10px">
		<table width="800" align="center" class="TDBBLRFORM" border="0"
			cellspacing="0" cellpadding="0" valign="middle">
			<tr>
				<td class="testform" width="800" callspan="1"><b>Transferor</b>
						&nbsp;<a class="anchor" style="display: none;" id="TRDISP"
						href="javascript:onQuestClick('TRDISP')" value="show all"
						align="right">show all</a>
				</td>
			</tr>
			<% if(optionsList123 != null){
	
	for(int i=0;i<optionsList123.size();i++){
	OptionsList obj =(OptionsList)optionsList123.get(i); 
	if(obj.getListTypeId() != null && obj.getListTypeId().equals("10")){
	%>
			<tr id="trtag<%=obj.getOptionValue()%>">
				<td><label for="<%=obj.getOptionId()%>x"><input type="radio" name="qest"
						id="<%=obj.getOptionId()%>x" value="<%=obj.getOptionValue()%>"
						onclick="onQuestClick('<%=obj.getOptionId()%>x')" />&nbsp;&nbsp;&nbsp;<%=obj.getOptionLabel()%></label></td>
			</tr>
			<%	
	}
	}	  		
	
} %>
			</table>
			<table width="800" align="center" border="0" cellspacing="0"
				cellpadding="0" valign="middle">
				<tr>
					<td>&nbsp;</td>
				</tr>
			</table>
			<div id="TABLE1" style="display:none">
			<table width="800" align="center" class="TDBBLRFORM" border="0"
				cellspacing="0" cellpadding="0" valign="middle">
				<tr>
					<td class="testform" width="800" callspan="1"><b>Transferee
							&nbsp;</b><a class="anchor" style="display: none;" id="TRDISP1"
							href="javascript:onQuestClick1('TRDISP1')" value="show all"
							align="right">show all</a>
					</td>
				</tr>
				<% if(optionsList123 != null){
	for(int i=0;i<optionsList123.size();i++){
	OptionsList obj =(OptionsList)optionsList123.get(i); 
	if(obj.getListTypeId() != null && obj.getListTypeId().equals("11")){
	%>
				<tr id="transforee<%=obj.getOptionValue()%>">
					<td><label for="<%=obj.getOptionId()%>y"><input type="radio" name="qest1"
							id="<%=obj.getOptionId()%>y" value="<%=obj.getOptionValue()%>"
							onclick="onQuestClick1('<%=obj.getOptionId()%>y')" />&nbsp;&nbsp;&nbsp;<%= obj.getOptionLabel()%></label></td>
				</tr>
				<%	
	}
	}	  		
} %>
			</table>
			<table width="800" align="center" border="0" cellspacing="0"
				cellpadding="0" valign="middle">
				<tr>
					<td>&nbsp;</td>
				</tr>
			</table></div>
			<div id="TABLE2" style="display:none">
			<table width="800" align="center" class="TDBBLRFORM" border="0"
				cellspacing="0" cellpadding="0" valign="middle">
				<tr>
					<td class="testform" width="800" callspan="1"><b>Type of
							transfer &nbsp;</b><a class="anchor" style="display: none;" id="TRDISP2"
							href="javascript:onQuestClick2('TRDISP2')" value="show all"
							align="right">show all</a>
					</td>
				</tr>
				<% if(optionsList123 != null){
	for(int i=0;i<optionsList123.size();i++){
	OptionsList obj =(OptionsList)optionsList123.get(i); 
	if(obj.getListTypeId() != null && obj.getListTypeId().equals("9")){
	%>
				<tr id="transforor<%= obj.getOptionValue()%>">
					<td><label for="<%=obj.getOptionId()%>z"><input type="radio" name="qest2"
							id="<%=obj.getOptionId()%>z" value="<%= obj.getOptionValue()%>"
							onclick="onQuestClick2('<%=obj.getOptionId()%>z')" />&nbsp;&nbsp;&nbsp;<%= obj.getOptionLabel()%></label></td>
				</tr>
				<%	
	
	}
	}	  		
	
} %>
			</table>
				<table width="800" align="center" border="0" cellspacing="0"
					cellpadding="0" valign="middle">
					<tr>
						<td>&nbsp;</td>
					</tr>
				</table></div>
				<div id="TABLE3" style="display:none">
				<table width="810" align="center" border="0" cellspacing="0"
					cellpadding="0" valign="middle">
					<tr class="testform">
						<td width="200" colspan="2"><b>Type of Shares
								&nbsp;</b></td>
						<td width="700" colspan="2"><b><label for="repart"><input
									type="radio" value="Y" name="repart" id="repart" 
									onClick="onClickRepatriations()"><u  title="Sale proceeds and dividend net of taxes is eligible to be taken back from India.">With Repatriation ?</u>&nbsp;&nbsp;</label><label
								for="norepart"><input type="radio" value="N" name="repart"
									id="norepart" onClick="onClickRepatriations()"><u  title=" Sale proceeds and dividend net of taxes is not eligible to be taken back from India.">Without Repatriation ?</u></b></td>
					</tr>
				</table>
				<table width="800" align="center" border="0" cellspacing="0"
					cellpadding="0" valign="middle">
					<tr>
						<td>&nbsp;</td>
					</tr>
				</table></div>
				<div id="TABLE8" style="display:none">
				<table width="810" align="center" border="0" cellspacing="0"
					cellpadding="0" valign="middle">
					<tr class="testform">
						<td width="310" colspan="2"><b>Status of shares post transfer
								&nbsp;</b></td>
						<td width="500" colspan="2"><b><label for="repart1"><input
									type="radio" value="Y" name="repart1" id="repart1" 
									onClick="onStatusRepatriations()"><u  title="Sale proceeds and dividend net of taxes is eligible to be taken back from India.">Repatriation ?</u>&nbsp;&nbsp;</label><label
								for="norepart1"><input type="radio" value="N" name="repart1"
									id="norepart1" onClick="onStatusRepatriations()"><u  title="Sale proceeds and dividend net of taxes is not eligible to be taken back from India.">Non Repatriation ?</u></b></td>
					</tr>
				</table>
				<table width="800" align="center" border="0" cellspacing="0"
					cellpadding="0" valign="middle">
					<tr>
						<td>&nbsp;</td>
					</tr>
				</table></div>
				<div id="TABLE4" style="display:none">
				<table width="800" align="center" class="TDBBLRFORM" border="0"
					cellspacing="0" cellpadding="0" valign="middle">
					<tr id="TR01">
						<td colspan="2" class="testform" width="800" id=""><b>Type Of
								Sector</b></td>
					</tr>
					<tr id="TR05">
						<td colspan="2"><select class="selectClass"
							style="width: 700px; border-radius: 5px;" name="qest2"
							onChange="onSectorsChange()" id="sectorsid"><option name='default' value=''>--------------------------------Select One-------------------------------</option>
							<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("12")){
				%>
				<option name='<%=obj.getOptionId()%>' id='<%=obj.getOptionId()%>~<%=obj.getQestFlag()%>' value='<%=obj.getOptionValue()%>' title='<%=obj.getOptionValue()%>'><%=obj.getOptionLabel()%></option>
				<%	
				}
				}	  		
			} %>
						</select></td>
					</tr>
				</table>
				<table width="800" align="center" border="0" cellspacing="0"
					cellpadding="0" valign="middle">
					<tr>
						<td>&nbsp;</td>
					</tr>
				</table></div>
				<div id="TABLE5" style="display:none">
				<table width="800" align="center" class="TDBBLRFORM" border="0"
					cellspacing="0" cellpadding="0" valign="middle">
					<tr>
						<td class="testform" width="800"><b>Type Of Sub
									Sector</b></td>
					</tr>
					<tr id="TR06">
						<td colspan="2"><select
							style="width: 700px; border-radius: 5px;" name="qest3" class="selectClass" 
							onChange="onSubSectorsChange()" id="subsectorsid">&nbsp;
						</select></td>
					</tr>
				</table>
			<!-- <table width="800" align="center" border="0" cellspacing="0"
				cellpadding="0" valign="middle">
				<tr>
					<td id="respDiv1"></td>
				</tr>
			</table> -->
				<table width="800" align="center" border="0" cellspacing="0"
					cellpadding="0" valign="middle">
					<tr>
						<td>&nbsp;</td>
					</tr>
				</table></div>
				<div id="TABLE6" style="display:none">
				<table width="810" align="center" class="TDBBLRFORM" border="0"
					cellspacing="0" cellpadding="0" valign="middle">
					<tr class="testform">
						<td width="80%"><b>Whether the Investee Indian Company is
								Micro, Small and Medium Enterprise in terms of Micro, Small and
								Medium Enterprises Development (MSMED) Act, 2006 .</b></td>
						<td width="15%"><b><label for="MsMeD">Yes&nbsp;<input
									type="radio" value="Y" name="MSME" id="MsMeD"
									onClick="onClickMSMEDS()"></label>&nbsp;&nbsp;<label for="NoMsMeD">No&nbsp;<input
									type="radio" value="N" name="MSME" id="NoMsMeD"
									onClick="onClickMSMEDS()"></label></b></td>
					</tr>
				</table>
			
			<!-- <div id="table6">
				<table width="800" align="center" border="0" cellspacing="0"
					cellpadding="0" valign="middle">
					<tr>
						<td>&nbsp;</td>
					</tr>
				</table>
				<table width="800" align="center" class="TDBBLRTFORM" border="0"
					cellspacing="0" cellpadding="0" valign="middle" id="test1form">
					<tr>
						<td><font><b>If yes, Please select the type of
									industry .</b></font></td>
					</tr>
					<tr>
						<td><select style="width: 700px; border-radius: 5px;"
							name="toi" onChange="onChange3()" id="optionvalue3"><option
									vlaue="Select One" default>Select One</option>

						</select>
						<td align="right"><input type="text" name="other"
							style="border-radius: 5px;" /></td>
						</td>
					</tr>
				</table>
			</div> -->
				<table width="800" align="center" border="0" cellspacing="0"
					cellpadding="0" valign="middle">
					<tr>
						<td>&nbsp;</td>
					</tr>
				</table></div>
				<div id="TABLE7" style="display:none">
				<table width="810" align="center" class="TDBBLRFORM" border="0"
					cellspacing="0" cellpadding="0" valign="middle">
					<tr class="testform">
						<td width="80%"><b>If not MSMED, please confirm whether
								it is an industrial undertaking having an industrial license
								under the provisions of The Industries (Development &
								Regulation) Act, 1951 for items reserved for MSE Sector .</b>
						<td width="15%"><b><label for="YeSmSmEd">Yes&nbsp;<input
									type="radio" value="Y" name="notMSME" id="YeSmSmEd"
									onClick="onClickNotMSMEDS()"></label>&nbsp;&nbsp;<label
								for="NOMsMeD">No&nbsp;<input type="radio" value="N"
									name="notMSME" id="NOMsMeD" onClick="onClickNotMSMEDS()"></label></b></td>
						</td>
					</tr>
					
				</table>
				<table width="800" align="center" border="0" cellspacing="0"
					cellpadding="0" valign="middle">
					<tr>
						<td>&nbsp;</td>
					</tr>
				</table>
			</div>
			<div id="submit" style="display: none;">
				<table width="800" align="center" border="0" cellspacing="0"
					cellpadding="0" valign="middle">
					<tr>
						<td align="center"><a class="anchor" id="finalanswer"
							href="javascript:goForConclude()" value="">Go For
								Conclusion</a></td>
					</tr>
				</table>
			</div>
			<div id="Result" style="display: none;">
				<table width="800" align="center" border="0" cellspacing="0"
					cellpadding="0" valign="middle">
					<tr>
						<td>&nbsp;</td>
					</tr>
				</table>

				<table width="800" align="center" class="TBFORM" border="0"
					cellspacing="0" cellpadding="0" valign="middle">
					<tr>
						<td class="testform" width="800" callspan="1" align="left"><b>Know Eligibility with Allied Conditions</b></td>
					</tr>
					<tr>
						<td id="respDiv" align="center"></td>
					</tr>
					<tr>
						<td>&nbsp;</td>
					</tr>
				</table>
			</div>
			</td></tr>
			<tr>
						<td>&nbsp;</td>
					</tr>
			</table>
			</form>
</body>
</html>